export const getSafeClip = () => {
    if (device.sdkInt >= 29) {
        const d = threads.disposable()
        threads.start(() => {
            let w: any = floaty.window(`<frame><input id="input"/></frame>`)
            ui.run(() => {
                w.requestFocus()
                w.input.requestFocus()
                ui.post(() => {
                    const link = getClip()
                    w.disableFocus()
                    w.close()
                    w = null
                    d.setAndNotify(link)
                })
            })
        })
        const link2 = d.blockedGet()
        return link2
    } else {
        return getClip()
    }
}